/*
 * @Author: jiayu
 * @Date: 2022-09-22 15:40:13
 * @LastEditors: jiayu
 * @LastEditTime: 2023-11-17 10:44:32
 * @Description: 
 */


(function () {
  window.base_url = 'http://192.168.50.126:8085/'
  window.home_url = 'http://www.baidu.com'
  window.manger_url = ''
  window.login_url = ''
  window.logout_url = ''
  const params_token = queryURLParams(window.location.href)['token']
  if (params_token) {
    localStorage.setItem('token', params_token)
  }
  window.token = localStorage.getItem('token') || 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsImp0aSI6ImRkeCJ9.eyJpc3MiOiJodHRwOlwvXC9hcGkucGFuby12LmNvbSIsImF1ZCI6Imh0dHA6XC9cL2FwaS5wYW5vLXYuY29tIiwiaWF0IjoxNzAwMTg4OTUxLCJqdGkiOiJkZHgiLCJleHAiOjE3MDAxOTYxNTEsInRva2VuIjoie1widWlkXCI6MSxcInNhbHRcIjpcIiMjIzdhOTI5MTYyMzU1YzU5YmNiZDUyMWFhNDA0YmQyNTI4XCIsXCJzb3VyY2VcIjoxLFwidGVuYW50X2lkXCI6XCJwYW5vdjAwMVwiLFwicGFub3ZfYlwiOlwiYmV0YV9wYW5vdlwiLFwidnJfaG9zdFwiOlwidnJpbnZlc3BlYy5wYW5vLXYuY25cIixcIndlYl9uYW1lXCI6XCJcXHU3NTU5XFx1NjA0YlxcdTc2ODRcXHU1YzgxXFx1NjcwOFwifSJ9.dvP4faSjSdWFXGn3lsZNIZJSuNtcc7gReexO59SELeM'
  function queryURLParams(URL) {

    let url = URL.split("?")[1];

    const urlSearchParams = new URLSearchParams(url);

    const params = Object.fromEntries(urlSearchParams.entries());

    return params

  }
})()

